import Vue from "vue"
import App from "./App"

Vue.config.productionTip = false;

//导入 mock
import "@/mock"
//按需导入element 组件
import { Button,Loading,MessageBox ,Message} from 'element-ui';


//注册全局组件
import TypeNav from "@/components/TypeNav"
import Pagination from "@/components/Pagination"
Vue.component("TypeNav",TypeNav);
Vue.component("Pagination",Pagination);

//导入 图片懒加载插件
import VueLazyload from 'vue-lazyload'
//导入懒加载图片
import loading from "@/assets/image/loading.gif";
//使用并配置
Vue.use(VueLazyload,{
    loading
})

//导入 验证插件


import "@/utils/validate"

Vue.use(Button)

Vue.prototype.$loading = Loading.service;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$message = Message;


//导入路由
import router from "@/router"
//导入 vuex
import store from "@/store"
new Vue({
    el:"#app",
    beforeCreate(){
        Vue.prototype.$bus = this;
    },
    router,
    store,
    render:h => h(App)
})

